package br.com.crednove.controle;

import br.com.crednove.paineis.PainelExportar;
import br.com.crednove.paineis.PainelFiltroRefin;
import br.com.crednove.paineis.PainelHome;
import br.com.crednove.paineis.PainelImportar;
import java.awt.CardLayout;
import javax.swing.JPanel;

public class ControleInicio {
    
    private CardLayout cdlGerenciadorDeLayout;
    private JPanel jpnMonte;
    public static final String painelHome = "Home";
    public static final String painelImportar = "Importar";
    public static final String painelExportar = "Exportar";
    public static final String painelUsuario = "GerenciaUsuario";
    public static final String painelFiltrarRefin = "FiltrarRefin";

    public ControleInicio(JPanel jpnMonte) {
        this.cdlGerenciadorDeLayout = new CardLayout();
        this.jpnMonte = jpnMonte;
        this.jpnMonte.setLayout(this.cdlGerenciadorDeLayout);
        this.jpnMonte.add(new PainelHome(), painelHome);
        this.jpnMonte.add(new PainelImportar(this), painelImportar);
        this.jpnMonte.add(new PainelExportar(this), painelExportar);
        this.jpnMonte.add(new PainelFiltroRefin(this), painelFiltrarRefin);
    }
    
    public void mostraPainel(String nomePainel){
        this.cdlGerenciadorDeLayout.show(this.jpnMonte, nomePainel);
    }

}
